package com.yequan.compare;

import java.util.Comparator;

/**
 * 基于id的升序排序
 *
 * @author yq
 * @date 2020/08/25
 */
public class AscIdComparator implements Comparator<Person> {
    @Override
    public int compare(Person o1, Person o2) {
        return o1.getId() - o2.getId();
    }
}
